package org.ruanjj.designprinciple.openclosed;

//这个类的设计是不合理的，每添加一种咖啡这里的代码都要进行变动被修改，违反了开闭原则
public class CoffeMaker {
    public void makeCoffee(String type){
        if("espresso".equals(type)){
            System.out.println("Making espresso coffee");
        }else if("latte".equals(type)){
            System.out.println("Making latte coffee");
        }
    }
}
